﻿#ifndef _blua_def_h_
#define _blua_def_h_

#include "blua_hdr.h"

#define BLD_MAX_MEMORY 1024 * 1024 * 100
#define BLD_MAX_FIELD_LEVEL 16
#define BLD_MAX_FIELD_LEN 256

struct blua_t;
typedef struct blua_t blua_t;
typedef struct blua_t* pblua_t;
struct luareg_t;
typedef struct luareg_t luareg_t;
typedef struct luareg_t* pluareg_t;
struct bluareg_t;
typedef struct bluareg_t bluareg_t;
typedef struct bluareg_t* pbluareg_t;

typedef const void* blua_pointer;
typedef lua_Number blua_number;
typedef lua_Integer blua_int;
typedef lua_Alloc blua_alloc;
typedef lua_CFunction lua_cfunc;
typedef int (*blua_cfunc)( pblua_t p_lua );

struct blua_t
{
	lua_State* p_state;
	
	void* p_stateparam;
	size_t un_totalmem;
	size_t un_maxmem;
};

struct luareg_t
{
	const char* pszu8_funcname;
	lua_cfunc pfn_func;
};

struct bluareg_t
{
	const char* pszu8_funcname;
	blua_cfunc pfn_bfunc;
};

#endif
/***********************************

2010/11/23-xx:xx @ corp.king
blua_def.h
bey0ndc00de
utf-8 --with-sig

************************************/
/*last for linux*/
